#include "DigiKeyboard.h"
int buttom_ = 0;
bool buttom_released = true;

bool run_once = false;
String password[] = {"a123456", "b123456", "c123456", "d123456", "e123456", "f123456", "g123456", "h123456"};
int  point_ = 0;
unsigned long last_time = 0;
void setup() {
  pinMode(buttom_ , INPUT_PULLUP);
  // don't need to set anything up to use DigiKeyboard

}

void loop() {
  // this is generally not necessary but with some older systems it seems to
  // prevent missing the first character after a delay:
  if (digitalRead(buttom_) == 0 and  buttom_released == true) {
    buttom_released = false;
    point_++;
    if (point_ >= 8) {
      point_ = 0;
    }
      DigiKeyboard.print( "times:");
      DigiKeyboard.println( point_);
    last_time = millis();
  }
  else if (digitalRead(buttom_) == 1 and  buttom_released == false) {
    buttom_released = true;
    run_once = true;
  }
  if (run_once == true) {
  if  ((millis() - last_time ) >= 3000) {
      DigiKeyboard.sendKeyStroke(0);

      // Type out this string letter by letter on the computer (assumes US-style
      // keyboard)
      DigiKeyboard.println( password[point_]);
      run_once = false;

    }
  }
}